High-performance tone detection using a digital signal processor (DSP) having multiple arithmetic logic units (ALUs)

ABSTRACT

In one embodiment, a DSP having four arithmetic logic units (ALUs) and able to have two read/write operations per clock cycle performs silence detection and tone detection for data frames containing samples of an audio signal. The ALUs are used together in parallel to process the samples in the data frames received by the DSP. A received data frame is filtered by the silence detection so that substantially silent frames are dropped and non-silent frames are further processed. In the tone detection, a filtered data frame is processed, four samples at a time, to determine the power of the signal at a given frequency, where the power determination is used to determine whether a given tone (i.e., a signal at a given frequency) is present in the data frame.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The current invention relates to digital signal processors (DSPs), and in particular, DSPs having multiple arithmetic logic units (ALUs).

2. Description of the Related Art

Conventional telephone keypads generate Dual Tone Multi Frequency (DTMF) signals when pressed. Pressing any particular key on a telephone keypad produces a unique combination of two tones, where a low tone represents the row of the key on the keypad and a high tone represents the column of the key on the keypad. The frequencies of the tones range from about 697 Hz to about 1633 Hz. Note that column frequency 1633 represents keys A, B, C, and D, where these keys, although part of DTMF signaling, are absent from many conventional telephone keypads. It should be noted that communication systems may produce other tone combinations comprising the same or a different number of tones at different frequencies. Corresponding communication equipment, such as equipment at a telephone company's central office that connects with the telephone, may need to be able to detect the presence of particular tones in a sample of audio content from the telephone.

Audio content in conventional modern telephone systems is usually digitized at a sampling rate of 8 kHz for processing and transmission by the telephone service provider(s). It should be noted that other sampling rates are possible. The digitized audio content is typically processed as data frames where each frame represents a window of time. Typical data frame lengths are 5 ms and 10 ms, which, at an 8 kHz sampling rate, are equivalent to 40 and 80 samples, respectively. A tone-detection decision is typically made once per frame. Several methods are known in the prior art for determining whether a frame contains audio content at a particular frequency.

The power P(F) of the input signal at a given frequency F in an N-sample data frame can be determined using the formula of Equation (1) below:

$\begin{matrix} {{{P(F)} = {{\sum\limits_{k = 1}^{N}{x_{k}{\mathbb{e}}^{{- j}\frac{2\pi\; F}{F_{s}}{({N - k})}}}}}^{2}},} & (1) \end{matrix}$ where x₁, x₂, . . . , x_(N) are the samples of the frame, j is the square root of −1, and F_(s) is the sampling frequency for the frame. The samples x₁, x₂, . . . , x_(N) represent voltage values of an electrical signal that represents corresponding sound pressure levels of an audio signal. Once the value of power P(F) is determined for the particular frame, that value is compared to a threshold and the result of the comparison is used in determining whether a tone at the given frequency has been detected for that frame.

Power P(F) for an N-sample frame can be calculated iteratively or recursively using the algorithm of Equation (2) below:

$\begin{matrix} {\mspace{20mu}{{{{Re}(0)} = {{{Im}(0)} = 0}}\mspace{20mu}{{{{Re}(n)} = {x_{n} + {{\cos\left( \frac{2\pi\; F}{F_{s}} \right)} \cdot {{Re}\left( {n - 1} \right)}} - {{\sin\left( \frac{2\pi\; F}{F_{s}} \right)} \cdot {{Im}\left( {n - 1} \right)}}}},\mspace{20mu}{and}}}} & (2.1) \\ {\mspace{20mu}{{{{Im}(n)} = {{{\sin\left( \frac{2\pi\; F}{F_{s}} \right)} \cdot {{Re}\left( {n - 1} \right)}} + {{\cos\left( \frac{2\pi\; F}{F_{s}} \right)} \cdot {{Im}\left( {n - 1} \right)}}}}\mspace{20mu}{{{{for}\mspace{14mu} n} = 1},2,\ldots\mspace{14mu},N}}} & (2.2) \\ {\mspace{20mu}{{P(F)} = {{{Re}(N)}^{2} + {{Im}(N)}^{2}}}} & (2.3) \end{matrix}$ Equation (2) calls for calculating values for Re(n) and Im(n) for each sample of the frame. The calculations for each sample are based on the values of x_(n), Re(n−1), and Im(n−1) (where Re(0) and Im(0) are 0). Power P(F) is then calculated for the N-sample frame based on Re(N) and Im(N). It should be noted that, generally, a recursive calculation would involve implementing the calculation using a procedure that calls itself repeatedly (e.g., N times) until some condition is met, while an iterative calculation would involve implementing the calculation using a procedure that includes an explicit instruction loop that is executed a certain number (e.g., N) of times. Thus, to illustrate a recursive function, a recursive pseudo-code implementation for a factorial function could be factorial(n) where if n=0 then return 1 else return n·factorial(n−1). Similarly, to illustrate an iterative function, an iterative pseudo-code implementation for a factorial function could be factorial(n) where temp=1; for i=2 to n, temp=temp·i; return temp. Since, generally, recursive algorithms can be transformed into corresponding iterative algorithms and vice-versa, the terms, as used herein, unless otherwise indicated, are interchangeable.

Another iterative or recursive way to calculate power P(F) for an N-sample frame involves using the Goertzel algorithm, as shown in Equation (3) below:

$\begin{matrix} {{S(0)} = {{S\left( {- 1} \right)} = 0}} & (3.1) \\ {{{S(n)} = {x_{n} + {2{{\cos\left( \frac{2\pi\; F}{F_{s}} \right)} \cdot {S\left( {n - 1} \right)}}} - {S\left( {n - 2} \right)}}}{{{{for}\mspace{14mu} n} = 1},2,\ldots\mspace{14mu},N}} & (3.2) \\ {{P(F)} = {{S(N)}^{2} - {2{{\cos\left( \frac{2\pi\; F}{F_{s}} \right)} \cdot {S(N)} \cdot {S\left( {N - 1} \right)}}} + {S\left( {N - 1} \right)}^{2}}} & (3.3) \end{matrix}$ The Goertzel algorithm involves calculating an N-item series of values from S(1) to S(N) for the samples x₁, x₂, . . . , x_(N) of the frame, where each S(n) value is based on x_(n), S(n−1), and S(n−2), and where S(0) and S(−1) are 0. Power P(F) for the N-sample frame is then calculated based on the last two values of the series, i.e., S(N) and S(N−1).

When any of the above calculations are performed by a processor, such as an Application-Specific Integrated Circuit (ASIC) or a Digital Signal Processor (DSP), slight modifications may be made to the formulas to account for the limitations of the fixed-point arithmetic that may be used by those processors. For example, a saturation function may be used to implement saturation arithmetic where results of arithmetic operations, which may otherwise overflow, are clamped between a maximum value and a minimum value. Saturation may also be used in rounding off numbers, such as, for example, in converting a 32-bit fixed-point number into a 16-bit fixed-point number. 32-bit fixed-point numbers are also known as Q31- or Q1.31-format numbers, where the 31 represents the number of bits after the binary point (i.e., the binary equivalent of a decimal point) and the 1, when present, represents the number of bits before the binary point. It should be noted that, in general, if no number is present before the binary point (e.g., Q31), it is assumed that “1” is intended there (i.e., Q1.31). Similarly, 16-bit fixed-point numbers are known as Q15-format or Q1.15-format numbers. As used herein, unless otherwise noted, references to Qc.15 and Qc.31 formats indicate generic format references that include formats with zero or more bits before the binary point. Thus, for example, the term Qc.31 format includes Q0.31, Q1.31, Q2.31, etc. formats.

In some implementations of a saturation function, the saturation function merely discards the least significant bits of the saturated number. This can cause round-off errors which may be corrected using an additive correction. Thus, if, for example, a saturation function SAT [a] discards the 16 least significant bits when saturating 32-bit number a to 16-bit number a′, then an additive correction of 2⁻¹⁶ may be used so that SAT[a+2⁻¹⁶] functions like a rounding-off function round[a] for rounding off a to a 16-bit number. An illustrative decimal example may be helpful to understand how this works. Suppose that the decimal-number function SAT[a] discards the digits after the decimal point of a. Thus, SAT[5.5] would result in 5, while SAT[4.99] would result in 4. Using an additive correction of 0.5, SAT[a+0.5] can be used as a rounding-off function where, for example, (a) SAT[5.5+0.5]=SAT[6.0]=6=round(5.5) and (b) SAT[4.99+0.5]=SAT[5.49]=5=round[4.99].

Equation (2) can be modified to accommodate the above-described saturation and additive correction, and also incorporate a normalization factor, as shown in Equation (4) below:

$\begin{matrix} {\mspace{20mu}{{{{Re}(0)} = {{{Im}(0)} = 0}}{{{{Re}(n)} = {S\; A\;{T\left\lbrack {2^{- 16} + {M \cdot x_{n}} + {{\cos\left( \frac{2\pi\; F}{F_{s}} \right)} \cdot {{Re}\left( {n - 1} \right)}} - {{\sin\left( \frac{2\pi\; F}{F_{s}} \right)} \cdot {{Im}\left( {n - 1} \right)}}} \right\rbrack}}},\mspace{20mu}{and}}}} & (4.1) \\ {{{{Im}(n)} = {S\; A\;{T\left\lbrack {2^{- 16} + {{\sin\left( \frac{2\pi\; F}{F_{s}} \right)} \cdot {{Re}\left( {n - 1} \right)}} + {{\cos\left( \frac{2\pi\; F}{F_{s}} \right)} \cdot {{Im}\left( {n - 1} \right)}}} \right\rbrack}}}\mspace{20mu}{{{{for}\mspace{14mu} n} = 1},2,\ldots\mspace{14mu},N}} & (4.2) \\ {\mspace{20mu}{{P(F)} = {S\; A\;{T\left\lbrack {2^{- 16} + {{Re}(N)}^{2} + {{Im}(N)}^{2}} \right\rbrack}}}} & (4.3) \end{matrix}$ where M is a pre-calculated normalization factor, SAT[ ] represents a saturation function for truncating Q c.31 numbers to Q c.15 format, and 2⁻¹⁶ is an additive correction factor to make saturation function SAT[ ] operate like a rounding-off function. Normalization is a process of adjusting data points in order to have them fit some particular rule, and is commonly used in signal processing. Note that, in a recursive implementation, the calculation would start with trying to determine Re(N) and Im(N), which would involve determining Re(N−1) and Im(N−1), which would in turn involve determining Re(N−2) and Im(N−2), and so forth down to Re(0) and Im(0). In contrast, an iterative implementation would involve first calculating Re(1) and Im(1) and then using the results to calculate Re(2) and Im(2), and so forth up to Re(N) and Im(N).

A conventional DSP would require 3N+O(1) clock cycles to calculate power P(F) using Equation (4). It should be noted that O(1) is in “big O” notation and represents a function bound by a constant and not dependent on N. Thus, for a 40-sample data frame (i.e., N=40) assuming, for example, O(1)=10, a conventional DSP would require 130 clock cycles to calculate power P(F) for the data frame using Equation (4). The DSP requires 2 clock cycles to perform multiplication operations, including multiply-and-accumulate (MAC) operations and multiply-and-subtract (MSU) operations. A MAC instruction operates such that MAC (a, b, c) adds the product of a and b to c, i.e., c=c+a·b. An MSU instruction operates such that MSU (a, b, c) subtracts the product of a and b from c, i.e., c=c−a·b. Since cos(2πF/F_(s)) and sin(2πF/F_(s)) are constants, they can be pre-calculated once and stored for use by each iteration. Each iteration of Equation (4.2) requires several MAC and MSU operations that take 2 clock cycles per iteration. Saturation requires another clock cycle per iteration. Equation (4.2) could be modified to remove the saturation function. This will make the procedure unstable and therefore liable to overflow and provide erroneous results, but would also reduce the number of cycles required for processing an N-sample frame to 2N+O(1) clock cycles.

Equation (3) can also be modified to accommodate the above-described saturation, additive correction, and normalization, as shown in Equation (5) below:

$\begin{matrix} {\mspace{20mu}{{S(0)} = {{S\left( {- 1} \right)} = 0}}} & (5.1) \\ {\mspace{20mu}{{{S(n)} = {S\; A\;{T\left\lbrack {2^{- 16} + {M \cdot x_{n}} + {2{{\cos\left( \frac{2\pi\; F}{F_{s}} \right)} \cdot {S\left( {n - 1} \right)}}} - {S\left( {n - 2} \right)}} \right\rbrack}}}\mspace{20mu}{{{{for}\mspace{14mu} n} = 1},2,\ldots\mspace{14mu},N}}} & (5.2) \\ {{P(F)} = {S\; A\;{T\left\lbrack {2^{- 16} + {S(N)}^{2} - {2\;{{\cos\left( \frac{2\pi\; F}{F_{s}} \right)} \cdot {S(N)} \cdot {S\left( {N - 1} \right)}}} + {S\left( {N - 1} \right)}^{2}} \right\rbrack}}} & (5.3) \end{matrix}$ where M is a pre-calculated normalization factor, SAT[ ] represents a saturation function for truncating Q c.31 numbers to Q c.15 format, and 2⁻¹⁶ is an additive correction.

A conventional DSP would require at least 4N+O(1) clock cycles to calculate power P(F) in accordance with Equation (5). It should be noted that, in some implementations, the DSP can store 2 cos(2πF/F_(s)) as a constant only if cos(2πF/F_(s)) is substantially between −0.5 and 0.5; otherwise, that DSP stores cos(2πF/F_(s)) as a constant and multiplies it by 2 in every iteration. In other implementations, the DSP can store 2 cos(2πF/F_(s)) as a constant regardless of the value of cos(2πF/F_(s)). Assuming 2 cos(2πF/F_(s)) is stored as a constant, each iteration of Equation (5.2) requires MAC, multiplication, subtraction, and saturation operations that take 3 clock cycles per sample. Saturation requires another clock cycle per iteration. Equation (5.2) could be modified to remove the saturation function. However, that will make the procedure unstable and therefore liable to overflow and provide erroneous results, but would also reduce the number of cycles required for processing an N-sample frame to 3N+O(1) clock cycles.

Some DSPs have multiple arithmetic logic units (ALUs) and multiple input/output (I/O) units that can process multiple instructions in a single clock cycle utilizing the multiple ALUs, multiple I/O units, and a pipeline architecture. A pipeline architecture allows the preparation of variables for a next iteration during a current iteration. Thus, after the first few clock cycles of a data set during which the pipeline is loaded and before the last few clock cycles of the data set during which the pipeline is unloaded, the DSP operates with a loaded pipeline, where extra clock cycles are not needed to load data for use by the ALUs since the pipeline is continually loaded as the ALUs perform their arithmetic operations. Conventional tone-power calculation systems might not make optimal use of these features of such DSPs.

SUMMARY OF THE INVENTION

One embodiment of the invention can be a digital signal processor (DSP) comprising a plurality D of arithmetic logic units (ALUs). The DSP is adapted to (a) receive a data frame comprising digital samples corresponding to an audio signal and (b) perform at least one of tone detection and silence detection for the data frame using the plurality of ALUs in parallel. The tone detection comprises (i) determining a power P(F) of a frequency F for the data frame and (ii) thresholding the determined power P(F) to determine whether a tone corresponding to the frequency F is present in the audio signal. The silence detection comprises filtering a given frequency range of the signal.

BRIEF DESCRIPTION OF THE DRAWINGS

Other aspects, features, and advantages of the present invention will become more fully apparent from the following detailed description, the appended claims, and the accompanying drawings in which like reference numerals identify similar or identical elements.

FIG. 1 shows a simplified block diagram of a tone-detection system in accordance with one embodiment of the present invention.

FIG. 2 shows a simplified block diagram of an implementation of the tone-power calculation module of FIG. 1.

FIG. 3 shows a flowchart for an exemplary implementation of the processing of a 40-sample frame.

FIG. 4 shows a simplified block diagram of a tone-detection system in accordance with another embodiment of the invention.

DETAILED DESCRIPTION

FIG. 1 shows a simplified block diagram of tone-detection system 100 in accordance with one embodiment of the invention. Tone-detection system 100 comprises pre-processor 101, tone-power calculation module 102, threshold comparator 103, controller 104, and post-processor 105. Pre-processor 101 receives a data frame of N samples via data bus 101 a. Pre-processor 101 performs appropriate pre-processing, such as filtering and automatic gain control, for the data frame and provides to tone-power calculation module 102, via data bus 101 b, the pre-processed frame of length N in the form of samples x₁, x₂, . . . , x_(N). Tone-power calculation module 102 determines power P(F) for the frame, and provides that power P(F) to threshold comparator 103 via data bus 102 a. Threshold comparator 103 determines whether or not power P(F) meets a pre-determined threshold. Threshold comparator 103 then outputs a corresponding yes or no via path 103 a to post-processor 105, which uses that determination to generate output 105 a, which is the output of tone-detection system 100. Controller 104 is connected to and controls the various components of tone-detection system 100.

FIG. 2 shows a simplified block diagram of an implementation of tone-power calculation module 102 of FIG. 1. A frame of N samples x₁, x₂, . . . , x_(N) is provided to data registers module 210 via data bus 101 b. The samples are provided as needed. The samples are accessed by ALUs 206, 207, 208, and 209, which use the sample values stored in data registers module 210 to calculate power P(F) for the frame. Only a few sample values need to be in data registers module 210 during any clock cycle. The samples are pipelined through data registers module 210 as the calculation progresses. Data registers module 210 comprises registers used to store intermediate values used in calculating power P(F). The flow of data in data registers module 210 and the operations performed by ALUs 206, 207, 208, and 209 are determined by DSP controller 104 of FIG. 1, which provides instructions to tone-power calculation module 102 via path 102 b. Tone-power calculation module 102 communicates with electronic memory 211 for storing and retrieving information via path ACc.

The tone-power calculation formula of Equation (4) can be transformed into the formulation of Equation (6) below for an accelerated calculation of power P(F) that requires only 0.75N+O(1) clock cycles:

$\begin{matrix} {{{{Re}_{1}(0)} = {2^{- 16} \cdot {\sum\limits_{k = 0}^{N - 1}\left\lbrack {{\cos\left( {\frac{2\pi\; F}{F_{s}}k} \right)} - {\sin\left( {\frac{2\pi\; F}{F_{s}}k} \right)}} \right\rbrack}}}{{{Im}_{1}(0)} = {2^{- 16} \cdot {\sum\limits_{k = 0}^{N - 1}\left\lbrack {{\cos\left( {\frac{2\pi\; F}{F_{s}}k} \right)} + {\sin\left( {\frac{2\pi\; F}{F_{s}}k} \right)}} \right\rbrack}}}{{{Re}_{2}(0)} = {{{Im}_{2}(0)} = 0}}} & \; \\ {for} & \; \\ {{n = 1},2,\ldots\mspace{14mu},{\frac{N}{4}\left\{ \begin{matrix} {{{V_{a}(n)} = {{{M \cdot x_{{4n} - 4 + a}}\mspace{14mu}{for}\mspace{14mu} a} = 1}},2,3,4} \\ {{{Re}_{1}(n)} = {{{Re}_{1}\left( {n - 1} \right)} + {{V_{1}(n)} \cdot {\cos\left( {\frac{2\pi\; F}{F_{s}}\left( {N - {4n} + 3} \right)} \right)}}}} \\ {{{Im}_{1}(n)} = {{{Im}_{1}\left( {n - 1} \right)} + {{V_{1}(n)} \cdot {\sin\left( {\frac{2\pi\; F}{F_{s}}\left( {N - {4n} + 3} \right)} \right)}}}} \\ {{{Re}_{2}(n)} = {{{Re}_{2}\left( {n - 1} \right)} + {{V_{2}(n)} \cdot {\cos\left( {\frac{2\pi\; F}{F_{s}}\left( {N - {4n} + 2} \right)} \right)}}}} \\ {{{Im}_{2}(n)} = {{{Im}_{2}\left( {n - 1} \right)} + {{V_{2}(n)} \cdot {\sin\left( {\frac{2\pi\; F}{F_{s}}\left( {N - {4n} + 2} \right)} \right)}}}} \\ {{{Re}_{1}(n)} = {{{Re}_{1}(n)} + {{V_{3}(n)} \cdot {\cos\left( {\frac{2\pi\; F}{F_{s}}\left( {N - {4n} + 1} \right)} \right)}}}} \\ {{{Im}_{1}(n)} = {{{Im}_{1}(n)} + {{V_{3}(n)} \cdot {\sin\left( {\frac{2\pi\; F}{F_{s}}\left( {N - {4n} + 1} \right)} \right)}}}} \\ {{{Re}_{2}(n)} = {{{Re}_{2}(n)} + {{V_{4}(n)} \cdot {\cos\left( {\frac{2\pi\; F}{F_{s}}\left( {N - {4n}} \right)} \right)}}}} \\ {{{Im}_{2}(n)} = {{{Im}_{2}(n)} + {{V_{4}(n)} \cdot {\sin\left( {\frac{2\pi\; F}{F_{s}}\left( {N - {4n}} \right)} \right)}}}} \end{matrix} \right.}} & \begin{matrix} {(6.1)\text{-}(6.4)} \\ (6.5) \\ \; \\ (6.6) \\ \; \\ (6.7) \\ (6.8) \\ \; \\ (6.9) \\ \; \\ (6.10) \\ \; \\ (6.11) \\ \; \\ (6.12) \end{matrix} \\ {{P(F)} = {{SAT}\left\lbrack {2^{- 16} + \left( {{SAT}\left\lbrack {{{Re}_{1}\left( {N/4} \right)} + {{Re}_{2}\left( {N/4} \right)}} \right\rbrack} \right)^{2} + \left( {{SAT}\left\lbrack {{{Im}_{1}\left( {N/4} \right)} + {{Im}_{2}\left( {N/4} \right)}} \right\rbrack} \right)^{2}} \right\rbrack}} & (6.13) \end{matrix}$ It should be noted that the additive correction here (2⁻¹⁶) is multiplied in the Equation (6) algorithm as an operational shortcut; it still functions as an additive correction in the algorithm. Equation (6) runs only one fourth of the iterations of Equation (4), with each iteration still requiring 3 clock cycles, thereby reducing the clock cycles for a frame of length N from 3N+O(1) to 0.75N+O(1). Multiple operations can be performed in each clock cycle by using parallel processing, i.e., simultaneously using ALUs 206, 207, 208, and 209 of FIG. 2. Re₁(n), Re₂(n), Im₁(n), and Im₂(n) refer to various intermediate values calculated on the way to calculating the values Re₁(N/4), Re₂(N/4), Im₁(N/4), and Im₂(N/4), which are determined in the final four steps, i.e., steps (6.9)-(6.12), of iteration number N/4, and which are used to calculate power P(F) for the N-sample frame.

For example, for a 40-sample frame, the equations for the first iteration, i.e., where n=1, are shown below:

$\begin{matrix} {{V_{1}(1)} = {M \cdot x_{1}}} & (6.1) \\ {{V_{2}(1)} = {M \cdot x_{2}}} & (6.2) \\ {{V_{3}(1)} = {M \cdot x_{3}}} & (6.3) \\ {{V_{4}(1)} = {M \cdot x_{4}}} & (6.4) \\ {{{Re}_{1}(1)} = {{{Re}_{1}(0)} + {{V_{1}(1)} \cdot {\cos\left( {\frac{2\pi\; F}{F_{s}}(39)} \right)}}}} & (6.5) \\ {{{Im}_{1}(1)} = {{{Im}_{1}(0)} + {{V_{1}(1)} \cdot {\sin\left( {\frac{2\pi\; F}{F_{s}}(39)} \right)}}}} & (6.6) \\ {{{Re}_{2}(1)} = {{{Re}_{2}(0)} + {{V_{2}(1)} \cdot {\cos\left( {\frac{2\pi\; F}{F_{s}}(38)} \right)}}}} & (6.7) \\ {{{Im}_{2}(1)} = {{{Im}_{2}(0)} + {{V_{2}(1)} \cdot {\sin\left( {\frac{2\pi\; F}{F_{s}}(38)} \right)}}}} & (6.8) \\ {{{Re}_{1}(1)} = {{{Re}_{1}(1)} + {{V_{3}(1)} \cdot {\cos\left( {\frac{2\pi\; F}{F_{s}}(37)} \right)}}}} & (6.9) \\ {{{Im}_{1}(1)} = {{{Im}_{1}(1)} + {{V_{3}(1)} \cdot {\sin\left( {\frac{2\pi\; F}{F_{s}}(37)} \right)}}}} & (6.10) \\ {{{Re}_{2}(1)} = {{{Re}_{2}(1)} + {{V_{4}(1)} \cdot {\cos\left( {\frac{2\pi\; F}{F_{s}}(36)} \right)}}}} & (6.11) \\ {{{Im}_{2}(1)} = {{{Im}_{2}(1)} + {{V_{4}(1)} \cdot {\sin\left( {\frac{2\pi\; F}{F_{s}}(36)} \right)}}}} & (6.12) \end{matrix}$

Note that each iteration comprises 12 steps that can be divided into three sets of four steps. In the first four steps of each iteration, i.e., steps (6.1)-(6.4), values are calculated for V₁(n), V₂(n), V₃(n), and V₄(n) based on the samples x_(4n−3), x_(4n−2), x_(4n−1), and x_(4n), respectively. In the middle four steps of each iteration, i.e., steps (6.5)-(6.8), temporary values of Re₁(n), Re₂(n), Im₁(n), and Im₂(n) are calculated. In the final four steps of each iteration, i.e., steps (6.9)-(6.12), the temporary values of Re₁(n), Re₂(n), Im₁(n), and Im₂(n) are overwritten with newly calculated intermediate values. These intermediate values may be stored in a data array. It is more efficient, however, to use memory-storage (MS) modules to hold the temporary and intermediate values of Re₁(n), Re₂(n) Im₁(n), and Im₂(n), overwriting the old values as new corresponding values are calculated based on the old values. The values and their corresponding variable names and MS modules are represented as Re₁, Re₂, Im₁, and Im₂. Depending on the particular implementation, MS modules could be implemented using data registers, cache, random access memory (RAM), EEPROM, and/or any other suitable memory. In FIG. 2, one or both of data registers module 210 and memory 211 comprise MS modules. In general, an MS module refers to an addressable segment of memory, where the segment is addressable using an address, an offset, and/or any other suitable addressing technology.

In one implementation of tone-power calculation module 102, MS modules Re₁, Re₂, Im₁, and Im₂ are updated with each iteration, based on the old values of the MS modules, as reflected by the formulation of Equation (7) below, which is based on Equations (6.1)-(6.12):

$\begin{matrix} {{initialize}\mspace{14mu}\left\{ {\begin{matrix} {{Re}_{1} = {2^{- 16} \cdot {\sum\limits_{k = 0}^{N - 1}\left\lbrack {{\cos\left( {\frac{2\pi\; F}{F_{s}}k} \right)} - {\sin\left( {\frac{2\pi\; F}{F_{s}}k} \right)}} \right\rbrack}}} \\ {{Im}_{1} = {2^{- 16} \cdot {\sum\limits_{k = 0}^{N - 1}\left\lbrack {{\cos\left( {\frac{2\pi\; F}{F_{s}}k} \right)} + {\sin\left( {\frac{2\pi\; F}{F_{s}}k} \right)}} \right\rbrack}}} \\ {{Re}_{2} = {{Im}_{2} = 0}} \end{matrix}\mspace{20mu}{for}} \right.} & \; \\ {{n = 1},2,\ldots\mspace{14mu},{\frac{N}{4}\left\{ \begin{matrix} {{V_{a} = {{{M \cdot x_{{4n} - 4 + a}}\mspace{14mu}{for}\mspace{14mu} a} = 1}},2,3,4} \\ {{Re}_{1} = {{Re}_{1} + {V_{1} \cdot {\cos\left( {\frac{2\pi\; F}{F_{s}}\left( {N - {4n} + 3} \right)} \right)}}}} \\ {{Im}_{1} = {{Im}_{1} + {V_{1} \cdot {\sin\left( {\frac{2\pi\; F}{F_{s}}\left( {N - {4n} + 3} \right)} \right)}}}} \\ {{Re}_{2} = {{Re}_{2} + {V_{2} \cdot {\cos\left( {\frac{2\pi\; F}{F_{s}}\left( {N - {4n} + 2} \right)} \right)}}}} \\ {{Im}_{2} = {{Im}_{2} + {V_{2} \cdot {\sin\left( {\frac{2\pi\; F}{F_{s}}\left( {N - {4n} + 2} \right)} \right)}}}} \\ {{Re}_{1} = {{Re}_{1} + {V_{3} \cdot {\cos\left( {\frac{2\pi\; F}{F_{s}}\left( {N - {4n} + 1} \right)} \right)}}}} \\ {{Im}_{1} = {{Im}_{1} + {V_{3} \cdot {\sin\left( {\frac{2\pi\; F}{F_{s}}\left( {N - {4n} + 1} \right)} \right)}}}} \\ {{Re}_{2} = {{Re}_{2} + {V_{4} \cdot {\cos\left( {\frac{2\pi\; F}{F_{s}}\left( {N - {4n}} \right)} \right)}}}} \\ {{Im}_{2} = {{Im}_{2} + {V_{4} \cdot {\sin\left( {\frac{2\pi\; F}{F_{s}}\left( {N - {4n}} \right)} \right)}}}} \end{matrix} \right.}} & \begin{matrix} {(7.1)\text{-}(7.4)} \\ (7.5) \\ \; \\ (7.6) \\ \; \\ (7.7) \\ (7.8) \\ \; \\ (7.9) \\ \; \\ (7.10) \\ \; \\ (7.11) \\ \; \\ (7.12) \end{matrix} \\ {{P(F)} = {{SAT}\left\lbrack {2^{- 16} + \left( {{SAT}\left\lbrack {{Re}_{1} + {Re}_{2}} \right\rbrack} \right)^{2} + \left( {{SAT}\left\lbrack {{Im}_{1} + {Im}_{2}} \right\rbrack} \right)^{2}} \right\rbrack}} & (7.13) \end{matrix}$ After variables Re₁, Re₂, Im₁, and Im₂ are initialized, each iteration of N/4 iterations requires 12 arithmetic operations, which are carried out by tone-power calculation module 102. Operations (7.1)-(7.4) can be carried out together in parallel and in one cycle by ALUs 206, 207, 208, and 209. Operations (7.5)-(7.8) can also be carried out together in parallel and in one cycle by ALUs 206, 207, 208, and 209. And operations (7.9)-(7.12) can also be carried out together in parallel and in one cycle by ALUs 206, 207, 208, and 209. An exemplary description of the operation of tone-power calculation module 102 processing 40-sample data frames is provided below.

The values of cos(2πF·k/F_(s)) and sin(2πF·k/F_(s)) for k=1 to 40, which are constant (assuming F, F_(s), and N are not changed between frames), used in every frame, and do not depend on particular data-sample (i.e., x_(n)) values, may be calculated before any frame is fully processed, and the calculated values may then be stored in memory for use in subsequent frames. The value of normalization constant M may similarly be stored in memory 211. These constants may then be read into data registers 210 via path ACc as needed by tone-power calculation module 102. Storing frequently used constants in memory and using them as necessary, rather than recalculating their value every time they are needed, reduces the number of calculations needed per frame and, consequently, frame-processing time.

FIG. 3 shows flowchart 300 for an exemplary implementation for the processing of a 40-sample frame using the algorithm of Equation (7). Frame processing commences with getting the frame for processing (step 301). Next, Re₁, Re₂, Im₁, and Im₂ are initialized (step 302). The initialization values in every frame for variables Re₁, Re₂, Im₁, and Im₂ are constant. The initial values of Re₂ and Im₂ are 0, while Re₁ and Im₁ are initialized using the calculated values of cos(2πF·k/F_(s)) and sin(2πF·k/F_(s)). Since the initial values of Re₁ and Im₁ are the same for every frame, they may also be calculated before any frames are received and stored in memory for retrieval and use as needed. The initial values of Re₂ and Im₂ may also be stored in memory, but since those initial values are 0, they may simply be set to 0 at the start of processing of every frame (step 302). After variables Re₁, Re₂, Im₁, and Im₂ are initialized for the frame, the process enters the first of 10 iterations for the 40-sample frame (steps 303-307). Each iteration processes four consecutive samples of the forty samples of the frame and proceeds as described below.

First, the four samples are retrieved (step 303). Next, V₁, V₂, V₃, and V₄ are calculated for the four samples, in parallel, using ALUs 206, 207, 208, and 209, in accordance with Equations (7.1)-(7.4) (step 304). The calculated values are then stored in the appropriate MS modules. Next, ALUs 206, 207, 208, and 209 calculate, in parallel, new values for variables Re₁, Re₂, Im₁, and Im₂ based on V₁ and V₂, in accordance with Equations (7.5)-(7.8) (step 305). Then, ALUs 206, 207, 208, and 209 calculate, in parallel, newer values for variables Re₁, Re₂, Im₁, and Im₂ based on V₃ and V₄, in accordance with Equations (7.9)-(7.12) (step 306). If there are more samples in the frame, then the next iteration is commenced (step 307). After all the iterations are completed, power P(F) is calculated based on the final values of variables Re₁, Re₂, Im₁, and Im₂ for the frame, in accordance with Equation (7.13) (step 308). The value of power P(F) is then provided to threshold comparator 103 of FIG. 1 via path 102 a, and the process terminates for the frame (step 309).

As would be appreciated by one of ordinary skill in the art, the above-described embodiment may be implemented in a variety of ways without departing from the scope of the invention. One typical implementation is defined using Assembler code. The Assembler code may define N/4 loops or may combine iterations to have fewer loops. Particular programming choices may vary depending on implementation-specific factors such as the number of registers available in data registers module 210, the number format for numbers stored in those registers, the number format for numbers stored in memory 211, and other factors specific to tone-power calculation module 102 and related modules.

In one alternative embodiment, N/8 iterations are used to process an N-sample frame of samples x₁, x₂, . . . , x_(N). The corresponding tone-power calculation, based on Equation (4), is represented in Equation (8) below, where α=2πF/F_(s), M is a normalization factor, 2⁻¹⁶ is an additive correction factor, and SAT[ ] is a saturation function.

$\begin{matrix} {{{Re}(0)} = {{{Im}(0)} = 0}} & (8.1) \\ {{{{for}\mspace{14mu} n} = 1},2,\ldots\mspace{14mu},{\frac{N}{8}\left\{ \begin{matrix} \begin{matrix} {{{Re}_{1}(n)} = {{2^{- 16} \cdot {\sum\limits_{k = 0}^{3}\left\lbrack {{\cos\left( {k\;\alpha} \right)} - {\sin\left( {k\;\alpha} \right)}} \right\rbrack}} + {\sum\limits_{k = 1}^{3}\left\lbrack {{\cos\left( {k\;\alpha} \right)} \cdot M \cdot x_{{8n} - 4 - k}} \right\rbrack} +}} \\ {{{\cos\left( {4\alpha} \right)} \cdot {{Re}\left( {n - 1} \right)}} - {{\sin\left( {4\alpha} \right)} \cdot {{Im}\left( {n - 1} \right)}} + {M \cdot x_{{8n} - 4}}} \\ \begin{matrix} {{{Im}_{1}(n)} = {{2^{- 16} \cdot {\sum\limits_{k = 0}^{3}\left\lbrack {{\cos\left( {k\;\alpha} \right)} + {\sin\left( {k\;\alpha} \right)}} \right\rbrack}} + {\sum\limits_{k = 1}^{3}\left\lbrack {{\sin\left( {k\;\alpha} \right)} \cdot M \cdot x_{{8n} - 4 - k}} \right\rbrack} +}} \\ {{{\sin\left( {4\alpha} \right)} \cdot {{Re}\left( {n - 1} \right)}} + {{\cos\left( {4\alpha} \right)} \cdot {{Im}\left( {n - 1} \right)}}} \end{matrix} \end{matrix} \\ {{{{Re}(n)} = {{SAT}\left\lbrack {{Re}_{1}(n)} \right\rbrack}},{{{Im}(n)} = {{SAT}\left\lbrack {{Im}_{1}(n)} \right\rbrack}}} \\ \begin{matrix} {{{Re}_{2}(n)} = {{2^{- 16} \cdot {\sum\limits_{k = 0}^{3}\left\lbrack {{\cos\left( {k\;\alpha} \right)} - {\sin\left( {k\;\alpha} \right)}} \right\rbrack}} + {\sum\limits_{k = 1}^{3}\left\lbrack {{\cos\left( {k\;\alpha} \right)} \cdot M \cdot x_{{8n} - k}} \right\rbrack} +}} \\ {{{\cos\left( {4\alpha} \right)} \cdot {{Re}(n)}} - {{\sin\left( {4\alpha} \right)} \cdot {{Im}(n)}} + {M \cdot x_{8n}}} \\ \begin{matrix} {{{Im}_{2}(n)} = {{2^{- 16} \cdot {\sum\limits_{k = 0}^{3}\left\lbrack {{\cos\left( {k\;\alpha} \right)} + {\sin\left( {k\;\alpha} \right)}} \right\rbrack}} + {\sum\limits_{k = 1}^{3}\left\lbrack {{\sin\left( {k\;\alpha} \right)} \cdot M \cdot x_{{8n} - k}} \right\rbrack} +}} \\ {{{\sin\left( {4\alpha} \right)} \cdot {{Re}(n)}} + {{\cos\left( {4\alpha} \right)} \cdot {{Im}(n)}}} \end{matrix} \end{matrix} \\ {{{{Re}(n)} = {{SAT}\left\lbrack {{Re}_{2}(n)} \right\rbrack}},{{{Im}(n)} = {{SAT}\left\lbrack {{Im}_{2}(n)} \right\rbrack}}} \end{matrix} \right.}} & (8.2) \\ {{P(F)} = {{{Re}\left( {N/8} \right)}^{2} + {{Im}\left( {N/8} \right)}^{2}}} & (8.3) \end{matrix}$

A more-detailed formulation appears below as Equation (9).

Assuming that constants are calculated, stored, and retrieved for later use, rather than re-calculated for each use, a DSP having four ALUs and two read/write operations per clock cycle using the formulation represented by Equations (9.1)-(9.39) would process an N-sample frame in N+O(1) clock cycles.

The formulations presented above, which refer to DSPs having 4 ALUs and 2 read/write operations per cycle, can be generalized for different multi-core (i.e., having multiple processors) DSPs. For a DSP with D ALUs and at least 2 read/write operations per cycle, the formulation of Equation (10) below may be used, where, unless otherwise indicated, variables are used in substantially the same way as described above.

$\begin{matrix} {{{{Re}_{1}(0)} = {2^{- 16} \cdot {\sum\limits_{m = 0}^{N - 1}\left\lbrack {{\cos\left( {\frac{2\pi\; F}{F_{s}}m} \right)} - {\sin\left( {\frac{2\pi\; F}{F_{s}}m} \right)}} \right\rbrack}}}{{{Im}_{1}(0)} = {2^{- 16} \cdot {\sum\limits_{m = 0}^{N - 1}\left\lbrack {{\cos\left( {\frac{2\pi\; F}{F_{s}}m} \right)} + {\sin\left( {\frac{2\pi\; F}{F_{s}}m} \right)}} \right\rbrack}}}{{{Re}_{2}(0)} = {{{Im}_{2}(0)} = 0}}\ldots{{{Re}_{D}(0)} = {{{Im}_{D}(0)} = 0}}} & \; \\ {for} & \; \\ {{n = 0},1,\ldots\mspace{14mu},{\left\lbrack {\frac{N}{D} - 1} \right\rbrack\left\{ \begin{matrix} {{{V_{a}(n)} = {{{M \cdot x_{{nD} + a}}\mspace{25mu} a} = 1}},2,\ldots\mspace{14mu},D} \\ {{{Re}_{1}\left( {n + 1} \right)} = {{{Re}_{1}(n)} + {{V_{1}(n)} \cdot {\cos\left( {\frac{2\pi\; F}{F_{s}}\left( {N - {Dn} - 1} \right)} \right)}}}} \\ {{{Im}_{1}\left( {n + 1} \right)} = {{{Im}_{1}(n)} + {{V_{1}(n)} \cdot {\sin\left( {\frac{2\pi\; F}{F_{s}}\left( {N - {Dn} - 1} \right)} \right)}}}} \\ {{{Re}_{2}\left( {n + 1} \right)} = {{{Re}_{2}(n)} + {{V_{2}(n)} \cdot {\cos\left( {\frac{2\pi\; F}{F_{s}}\left( {N - {Dn} - 2} \right)} \right)}}}} \\ {{{Im}_{2}\left( {n + 1} \right)} = {{{Im}_{2}(n)} + {{V_{2}(n)} \cdot {\sin\left( {\frac{2\pi\; F}{F_{s}}\left( {N - {Dn} - 2} \right)} \right)}}}} \\ \ldots \\ {{{Re}_{D}\left( {n + 1} \right)} = {{{Re}_{D}(n)} + {{V_{D}(n)} \cdot {\cos\left( {\frac{2\pi\; F}{F_{s}}\left( {N - {Dn} - D} \right)} \right)}}}} \\ {{{Im}_{D}\left( {n + 1} \right)} = {{{Im}_{D}(n)} + {{V_{D}(n)} \cdot {\sin\left( {\frac{2\pi\; F}{F_{s}}\left( {N - {Dn} - D} \right)} \right)}}}} \end{matrix} \right.}} & \begin{matrix} \mspace{11mu} \\ \; \\ \; \\ (10.1) \\ \; \\ (10.2) \\ \; \\ \left( {10.2'} \right) \\ \; \\ (10.3) \\ \left( {10.3'} \right) \\ \; \\ \; \\ \left( {10.D} \right) \\ \; \\ \left( {10.{D'}} \right) \end{matrix} \\ {{P(F)} = {{SAT}\begin{bmatrix} {2^{- 16} +} \\ {\left( {{SAT}\left\lbrack {{{Re}_{1}\left( {N/D} \right)} + {{Re}_{2}\left( {N/D} \right)} + \ldots + {{Re}_{D}\left( {N/D} \right)}} \right\rbrack} \right)^{2} +} \\ \left( {{SAT}\left\lbrack {{{Im}_{1}\left( {N/D} \right)} + {{Im}_{2}\left( {N/D} \right)} + \ldots + {{Im}_{D}\left( {N/D} \right)}} \right\rbrack} \right)^{2} \end{bmatrix}}} & \; \end{matrix}$

Using the above formulation, D Re(n) and D Im(n) variables are initialized. Then, N/D iterations are run to process the samples in the frame, where each iteration takes D samples from the N-sample frame and performs 2D arithmetic operations. After all the samples are processed, power P(F) is calculated. Calculating power P(F) using the above formulation on a DSP with D ALUs would require 3N/D+O(1) clock cycles. That is so because, in each iteration, (a) the calculations of Equation (10.1) are performed in parallel in one clock cycle, then (b) the calculations of Equations (10.2)-(10.D) are performed in parallel in one clock cycle, and then (c) the calculations of Equations (10.2′)-(10.D′) are performed in parallel in one clock cycle.

A generic alternative implementation of the above formulation is represented by the formulation of Equation (11) below, where, unless otherwise indicated, the variables and functions retain the same meaning as above.

$\begin{matrix} {{{Re}(0)} = {{{Im}(0)} = 0}} & (11.1) \\ {{{{for}\mspace{14mu} n} = 1},2,\ldots\mspace{14mu},{\frac{N}{2D}\left\{ \begin{matrix} \begin{matrix} {{{Re}_{1}(n)} = {{2^{- 16} \cdot {\sum\limits_{s = 0}^{D}\left\lbrack {{\cos\left( {s\;\alpha} \right)} - {\sin\left( {s\;\alpha} \right)}} \right\rbrack}} + {\sum\limits_{s = 1}^{D}\left\lbrack {{\cos\left( {s\;\alpha} \right)} \cdot M \cdot x_{{2{Dn}} - D - s}} \right\rbrack} +}} \\ {{{\cos\left( {D\;\alpha} \right)} \cdot {{Re}\left( {n - 1} \right)}} - {{\sin\left( {D\;\alpha} \right)} \cdot {{Im}\left( {n - 1} \right)}} + {M \cdot x_{{2{Dn}} - D}}} \\ \begin{matrix} {{{Im}_{1}(n)} = {{2^{- 16} \cdot {\sum\limits_{s = 0}^{D}\left\lbrack {{\cos\left( {s\;\alpha} \right)} + {\sin\left( {s\;\alpha} \right)}} \right\rbrack}} + {\sum\limits_{s = 1}^{D}\left\lbrack {{\sin\left( {s\;\alpha} \right)} \cdot M \cdot x_{{2{Dn}} - D - s}} \right\rbrack} +}} \\ {{{\sin\left( {D\;\alpha} \right)} \cdot {{Re}\left( {n - 1} \right)}} + {{\cos\left( {D\;\alpha} \right)} \cdot {{Im}\left( {n - 1} \right)}}} \end{matrix} \end{matrix} \\ {{{{Re}(n)} = {{SAT}\left( {{Re}_{1}(n)} \right)}},{{{Im}(n)} = {{SAT}\left( {{Im}_{1}(n)} \right)}}} \\ \begin{matrix} {{{Re}_{2}(n)} = {{2^{- 16} \cdot {\sum\limits_{s = 0}^{D}\left\lbrack {{\cos\left( {s\;\alpha} \right)} - {\sin\left( {s\;\alpha} \right)}} \right\rbrack}} + {\sum\limits_{s = 1}^{D}\left\lbrack {{\cos\left( {s\;\alpha} \right)} \cdot M \cdot x_{{2{Dn}} - s}} \right\rbrack} +}} \\ {{{\cos\left( {D\;\alpha} \right)} \cdot {{Re}(n)}} - {{\sin\left( {D\;\alpha} \right)} \cdot {{Im}(n)}} + {M \cdot x_{2{Dn}}}} \\ \begin{matrix} {{{Im}_{2}(n)} = {{2^{- 16} \cdot {\sum\limits_{s = 0}^{D}\left\lbrack {{\cos\left( {s\;\alpha} \right)} + {\sin\left( {s\;\alpha} \right)}} \right\rbrack}} + {\sum\limits_{s = 1}^{D}\left\lbrack {{\sin\left( {s\;\alpha} \right)} \cdot M \cdot x_{{2{Dn}} - s}} \right\rbrack} +}} \\ {{{\sin\left( {D\;\alpha} \right)} \cdot {{Re}(n)}} + {{\cos\left( {D\;\alpha} \right)} \cdot {{Im}(n)}}} \end{matrix} \end{matrix} \\ {{{{Re}(n)} = {{SAT}\left\lbrack {{Re}_{2}(n)} \right\rbrack}},{{{Im}(n)} = {{SAT}\left\lbrack {{Im}_{2}(n)} \right\rbrack}}} \end{matrix} \right.}} & (11.2) \\ {{P(F)} = {{{Re}\left( {{N/2}D} \right)}^{2} + {{Im}\left( {{N/2}D} \right)}^{2}}} & (11.3) \end{matrix}$

A more-detailed formulation appears in Equation (12) below, where, unless otherwise noted, variables retain the same meaning as above.

FIG. 4 shows a simplified block diagram of tone-detection system 400 in accordance with another embodiment of the invention. Tone-detection system 400 contains many of the same modules as tone-detection system 100 of FIG. 1, but with the addition of silence-detection module 412, which receives frames of N pre-processed samples from pre-processor 101 via path 101 b and conditionally provides those frames to tone-power calculation module 102 via path 412 a. Silence-detection module 412 determines whether a received frame substantially represents silence. If a frame is determined to be substantially silence, then that frame is not provided to tone-power calculation module 102. Otherwise, the frame is provided to tone-power calculation module 102 to determine the presence of particular tones, as described above. It should be noted that silence-detection module 412 and tone-power calculation module 102 may be implemented using different DSPs or the same DSP, wherein the DSP functions as both silence-detection module 412 and tone-power calculation module 102. For example, a DSP, functioning as a silence-detection module, can receive a frame and first determine whether it is substantially silence and, if it determines that the frame is not silence, then the DSP, functioning as a tone-power calculation module, can calculate the power of a particular frequency in the frame.

In accordance with one implementation of silence-detection module 412, silence-detection module 412 reliably detects whether the energy in the 200 Hz-3400 Hz band is below −34 dBm. A second-order bypass filter to achieve that can be represented by Equation (13) below: z _(n)=0.825·x _(n)−0.825·x _(n−2)−0.16·z _(n−1)−0.6499·z _(n−2)  (13) If we denote B₀=0.825, A₁=−0.16, and A₂=−0.6499 and use saturation and additive correction (e.g., where x_(k) and z_(k) are in Qc.15 format, and arithmetic operations provide Qc.31 results), then we can represent Equation (13) for an N-sample frame according to Equation (14) as follows: z _(n)=2⁻¹⁶ +B ₀ ·x _(n) −B ₀ ·x _(n−2) +A ₁ ·z _(n−1) +A ₂ ·z _(n−2)]  (14)

for n=1, 2, . . . , N

A prior-art DSP would require at least 2·N clock cycles to process an N-sample frame. One implementation of silence-detection module 412 can process an N-sample frame, comprising samples x₁, x₂, . . . , x_(N), in 1.5·N+O(1) clock cycles using a filter represented by the algorithm of Equation (15) below, where the terms have the values described above. z _(n)=2⁻¹⁶ +B ₀ ·x _(n) −B ₀ ·x _(n−2) +A ₁ ·z _(n−1) +A ₂ ·z _(n−2)  (15.1) z _(n−1)=2⁻¹⁶ +B ₀ ·x _(n−1) −B ₀ ·x _(n−3) +A ₁ ·z _(n−2) +A ₂ ·z _(n−3)  (15.2)

for n=2, 4, 6, . . . , N

Or, alternatively, the implementation can be represented by the algorithm of Equation (16) below, where the term A_(1·2) represents A₁·A₂, the term A_(1·1+2) represents A₁·A₁+A₂, and 2⁻¹⁶ is an additive correction. z _(n)=2⁻¹⁶ +B ₀ ·x _(n) −B ₀ ·x _(n−2) +A ₁·(2⁻¹⁶ +B ₀ ·x _(n−1) −B ₀ ·x _(n−3))+A _(1·1+2) ·z _(n−2) +A _(1·2) ·z _(n−3)  (16.1) z _(n−1)=2⁻¹⁶ +B ₀ ·x _(n−1) −B ₀ ·x _(n−3) +A ₁ ·z _(n−2) +A ₂ ·z _(n−3)  (16.2)

for n=2, 4, 6, . . . , N

The algorithm represented by Equation (16) takes samples x_(n), x_(n−1), x_(n−2), x_(n−3), and results z_(n−2), z_(n−3) and iteratively calculates z_(n) and z_(n−1). Each iteration of the algorithm takes up three clock cycles. As a result, the total number of clock cycles required to process an N-sample frame is 1.5·N+O(1). Silence-detection module 412 can implement Equation (16) by processing 3 iterations of the algorithm together in 9 clock cycles. In other words, 6 inputs (4 samples and 2 results) are handled every 9 clock cycles. A more-detailed representation of Equation (16) for silence-detection module 412 is provided as Equation (17) below. q _(n)=2⁻¹⁶  (17.1) q _(n−1)=2⁻¹⁶  (17.2) q _(n) =q _(n) −B ₀ ·x _(n−2)  (17.3) q _(n−1) =q _(n−1) −B ₀ ·x _(n−3)  (17.4) read x _(n−1) and x _(n)  (17.5) q _(n) =q _(n) +B ₀ ·x _(n)  (17.6) q _(n−1) =q _(n−1) +B ₀ ·x _(n−1)  (17.7) z _(n) =q _(n)  (17.8) z _(n−1) −q _(n−1)  (17.9) z _(n) =z _(n) +A ₁ ·z _(n−1)  (17.10) z _(n) =z _(n) +A _(1·2) ·z _(n−3)  (17.11) z _(n−1) =z _(n−1) +A ₂ ·z _(n−3)  (17.12) z _(n) =z _(n) +A _(1·1+2) ·z _(n−2)  (17.13) z _(n−1) =z _(n−1) +A ₁ ·z _(n−2)  (17.14) write z _(n−1) and z _(n)  (17.15)

for n=2, 4, 6, . . . , N

Silence-detection module 412 performs operations (17.1)-(17.15) as shown as Equation (18) below, where (a) the square brackets denote a set of operations that are executed in parallel in one clock cycle and (b) the subscript indexes (e.g., “s,” “s−1,” and “s−2”) mean indexes of iterations. For example, operations (17.1) and (17.2) of the iteration n=s are performed together with (i.e., in the same clock cycle as) operation (17.8) and (17.9) of the iteration n=s−2 and operations (17.11) and (17.12) of the iteration n=s−4.

$\begin{matrix} {\left\lbrack \begin{matrix} {(17.1)_{s},(17.2)_{s},} & {(17.8)_{s - 2},(17.9)_{s - 2},} & {(17.11)_{s - 4},(17.12)_{s - 4}} \\ {(17.3)_{s},(17.4)_{s},(17.5)_{s},} & \; & {(17.13)_{s - 4},(17.14)_{s - 4}} \\ {(17.6)_{s},(17.7)_{s},} & {(17.10)_{s - 2},} & (17.15)_{s - 4} \end{matrix} \right\rbrack\quad} & (18) \end{matrix}$

It should be noted that the above-described implementation for silence-detection module 412 is designed for N-sample frames where N mod 6=4. For example, for N=40, 40 mod 6=4. As would be appreciated by one of ordinary skill in the art, the described algorithm may be modified for frames of other lengths.

In an alternative embodiment of silence-detection module 412, silence-detection module 412 uses a multi-processor DSP having m ALUs and multiple read-write operations per clock cycle that is able to perform multiple operations in parallel. A filter for such a multi-ALU DSP can be represented by the formulation of Equation (19) below: z _(n)=2⁻¹⁶(1+B ₀ +B ₁ + . . . +B _(m−3))+B ₀(x _(n) −x _(n−2))+B ₁(x _(n−1) −x _(n−3))+B ₂(x _(n−2) −x _(n−4))+ . . . +B _(m−3)(x _(n−m−3) −x _(n−m−5))+B _(m−2) ·z _(n−m+2) +B _(m−1) ·z _(n−m+1)  (19) Since B_(i) does not depend on n, the values of B_(i) may be pre-calculated and stored in a memory for use as needed. Values for B_(i) may be calculated recursively using the algorithm of Equation (20) below. B ₀ =B ₀,  (20.1) B ₁ =A ₁ ·B ₀  (20.2)

For i=2 to m−3, B _(i) =A ₁ ·B _(i−1) +A ₂ ·B _(i−2)  (20.3) Thus, for example, B₂=A₂·B₀+(A₁)²·B₀ and B₃=B₀·(2·A₁·A₂+(A₁)³).

Equation (19) can be transformed for implementation using silence-detection module 412 according to Equation (21) as follows, where q_(n) is the output: q _(n)=2⁻¹⁶(1+B ₀ +B ₁ + . . . +B _(m−3))  (21.1) q _(n) =q _(n) +B _(m−3)·(x _(n−m−3) −x _(n−m−5))  (21.2) . . . q _(n) =q _(n) +B ₁·(x _(n−1) −x _(n−3))  (21.m−2) read x _(n) ,x _(n−2)  (21.m−1) d _(n) =x _(n) −x _(n−2)  (21.m) q _(n) =q _(n) +B ₀ ·d _(n)  (21.m+1) q _(n) =q _(n) +B _(m+1) ·q _(n−m)  (21.m+2) write q _(n)  (21.m+3)

for n=m+1, m+2, m+3, . . . , N

Silence-detection module 412 performs operations (21.1)-(21.m+3) as shown in Equation (22) below, where (a) the square brackets denote a set of operations that are executed in one clock cycle and (b) the subscript indexes (e.g., “s,” “s−1,” and “s−2”) mean indexes of iterations. [(21.1)_(s),(21.2)_(s−1),(21.3)_(s−2), . . . (21.m+2)_(s−m−1),(21.m+3)_(s−m−2),]  (22) It should be noted that operations (21.1), (21.m−1), and (21.m+3) are read/write operations, while the others are arithmetic operations. Note that operation (21.1) here is a read operation because the value of 2⁻¹⁶(1+B₀+B₁+ . . . +B_(m−3)) is pre-calculated and operation (21.1) consists of loading that pre-calculated value into q_(n). As can be seen, one clock cycle is needed to implement one step of the iteration. However, approximately m clock cycles are needed to get to the point where all the operations can be performed simultaneously since the operational pipeline needs to be filled. For example, if silence-detection module 412 uses 4 ALUs, then, on the second iteration (e.g., s=2), only operations from the first two iterations can be performed. Once s>=m+3, all the algorithms of Equation (21) can be implemented simultaneously. Thus, a total of N+m+3 clock cycles are needed to process one N-sample frame of data. It should be further noted that silence-detection module 412 needs to be able to perform at least three read/write operations per clock cycle in this implementation.

Embodiments of the invention have been described in the context of DTMF telephony signals. The invention is not limited to DTMF tones or telephony applications. Some alternative embodiments are used for tone-power calculation and/or silence detection in contexts outside of DTMF signals. Some alternative embodiments are used for tone-power calculation and/or silence detection in contexts outside of telephony.

An embodiment of the invention has been described where the silence-detection module 412 of FIG. 4 is used in conjunction with tone-power calculation module 102. In an alternative implementation, silence-detection module 412 is used independently of a tone-power calculation module.

Embodiments of the invention have been described wherein a pre-processor, a threshold comparator, and a post-processor are used. These devices are not necessary for the invention. Alternative embodiments of the invention are implemented without one or more of a pre-processor, threshold comparator, and post-processor.

Embodiments of the invention have been described wherein the frames comprise 40 samples. As already noted, data frames of different sizes are possible. Alternative embodiments of the invention process data frames having a number of samples other than 40.

An embodiment of the invention has been described where the silence-detection module was shown as separate from the pre-processor. In an alternative embodiment, the silence-detection module is part of the pre-processor. In general, as also indicated elsewhere, the various modules described may be physically implemented in a wide variety of ways, as would be appreciated by one of ordinary skill in the art.

References herein to the verb “to set” and its variations in reference to values of fields do not necessarily require an active step and may include leaving a field value unchanged if its previous value is the desired value. Setting a value may nevertheless include performing an active step even if the previous or default value is the desired value.

As used herein in reference to data transfers between entities in the same device, and unless otherwise specified, the terms “receive” and its variants can refer to receipt of the actual data, or the receipt of one or more pointers to the actual data, wherein the receiving entity can access the actual data using the one or more pointers.

Exemplary embodiments have been described wherein particular entities (a.k.a. modules) perform particular functions. However, the particular functions may be performed by any suitable entity and are not restricted to being performed by the particular entities named in the exemplary embodiments.

References herein to the verb “to generate” and its variants in reference to information or data do not necessarily require the creation and/or storage of new instances of that information. The generation of information could be accomplished by identifying an accessible location of that information. The generation of information could also be accomplished by having an algorithm for obtaining that information from accessible other information.

As used herein in reference to an element and a standard, the term “compatible” means that the element communicates with other elements in a manner wholly or partially specified by the standard, and would be recognized by other elements as sufficiently capable of communicating with the other elements in the manner specified by the standard. The compatible element does not need to operate internally in a manner specified by the standard.

The present invention may be implemented as circuit-based processes, including possible implementation as a single integrated circuit (such as an ASIC or an FPGA), a multi-chip module, a single card, or a multi-card circuit pack. As would be apparent to one skilled in the art, various functions of circuit elements may also be implemented as processing steps in a software program. Such software may be employed in, for example, a digital signal processor, micro-controller, or general-purpose computer.

It will be further understood that various changes in the details, materials, and arrangements of the parts which have been described and illustrated in order to explain the nature of this invention may be made by those skilled in the art without departing from the scope of the invention as expressed in the following claims.

Reference herein to “one embodiment” or “an embodiment” means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the invention. The appearances of the phrase “in one embodiment” in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments necessarily mutually exclusive of other embodiments. The same applies to the term “implementation.”

Unless explicitly stated otherwise, each numerical value and range should be interpreted as being approximate as if the word “about” or “approximately” preceded the value of the value or range. As used in this application, unless otherwise explicitly indicated, the term “connected” is intended to cover both direct and indirect connections between elements.

For purposes of this description, the terms “couple,” “coupling,” “coupled,” “connect,” “connecting,” or “connected” refer to any manner known in the art or later developed in which energy is allowed to be transferred between two or more elements, and the interposition of one or more additional elements is contemplated, although not required. The terms “directly coupled,” “directly connected,” etc., imply that the connected elements are either contiguous or connected via a conductor for the transferred energy.

The use of figure numbers and/or figure reference labels in the claims is intended to identify one or more possible embodiments of the claimed subject matter in order to facilitate the interpretation of the claims. Such use is not to be construed as limiting the scope of those claims to the embodiments shown in the corresponding figures.

Although the steps in the following method claims are recited in a particular sequence with corresponding labeling, unless the claim recitations otherwise imply a particular sequence for implementing some or all of those steps, those steps are not necessarily intended to be limited to being implemented in that particular sequence. 

We claim:
 1. A digital signal processor (DSP) comprising a plurality of D arithmetic logic units (ALUs), wherein the DSP is adapted to: receive an N-sample data frame comprising digital samples corresponding to an audio signal; and perform tone detection for the data frame using the ALUs of the plurality of D ALUs in parallel, wherein the tone detection comprises: (i) determining a power P(F) of a frequency F for the data frame by performing the following operations on the N-sample data frame: (a) generate V_(a)(n) where V_(a)(n)=M·x_(nD+a), for a=1, . . . , D and n=0, . . . , [N/D−1], wherein the DSP is adapted to perform operation (a) in one clock cycle for at least one value of n by using all of the ALUs of the plurality of D ALUs in parallel; (b)  generate  Re_(a)(n + 1)   ${{{where}\mspace{14mu}{{Re}_{a}\left( {n + 1} \right)}} = {{{Re}_{a}(n)} + {{V_{a}(n)} \cdot {\cos\left( {\frac{2\pi\; F}{F_{s}}\left( {n - {Dn} - a} \right)} \right)}}}},$ for a=1, . . . , D and n=0, . . . , [N/D−1], wherein the DSP is adapted to perform operation (b) in one clock cycle for at least one value of n by using all of the ALUs of the plurality of D ALUs in parallel; and (c)  generate  Im_(a)(n + 1)   ${{{where}\mspace{14mu}{{Im}_{a}\left( {n + 1} \right)}} = {{{Im}_{a}(n)} + {{V_{a}(n)} \cdot {\sin\left( {\frac{2\pi\; F}{F_{s}}\left( {n - {Dn} - a} \right)} \right)}}}},$ for a=1, . . . , D and n=0, . . . , [N/D−1], wherein the DSP is adapted to perform operation (c) in one clock cycle for at least one value of n by using all of the ALUs of the plurality of D ALUs in parallel, wherein V_(a)(k), Re_(a)(k), and Im_(a)(k) are storage variables, F_(s) is a sampling frequency for the data frame, x_(i) is the ith sample of the data frame, a, k, and n are counting variables, and M is a normalization factor; and (ii) thresholding the determined power P(F) to determine whether a tone corresponding to the frequency F is present in the audio signal.
 2. The DSP of claim 1, wherein the DSP is adapted to determine the power P(F) in accordance with the equation ${{P(F)} = {{SAT}\left\lbrack {A + \left( {{SAT}\left\lbrack {{{Re}_{1}\left( \frac{N}{D} \right)} + {{Re}_{2}\left( \frac{N}{D} \right)} + \ldots + {{Re}_{D}\left( \frac{N}{D} \right)}} \right\rbrack} \right)^{2} + \left( {{SAT}\left\lbrack {{{Im}_{1}\left( \frac{N}{D} \right)} + {{Im}_{2}\left( \frac{N}{D} \right)} + \ldots + {{Im}_{D}\left( \frac{N}{D} \right)}} \right\rbrack} \right)^{2}} \right\rbrack}},$ where SAT[ ] is a saturation function and A is an additive correction.
 3. The DSP of claim 1, wherein the DSP is adapted to: (A) initialize Re₁(0) to ${A \cdot {\sum\limits_{m = 0}^{N - 1}\left\lbrack {{\cos\left( {\frac{2\pi\; F}{F_{s}}m} \right)} - {\sin\left( {\frac{2\pi\; F}{F_{s}}m} \right)}} \right\rbrack}};$ (B) initialize Im₁(0) to ${A \cdot {\sum\limits_{m = 0}^{N - 1}\left\lbrack {{\cos\left( {\frac{2\pi\; F}{F_{s}}m} \right)} + {\sin\left( {\frac{2\pi\; F}{F_{s}}m} \right)}} \right\rbrack}};$  and (C) initialize Re_(j)(0) and Im_(j)(0) to 0 for j=2, . . . , D, wherein A is an additive correction and m and j are counting variables.
 4. The DSP of claim 3, wherein the DSP is adapted to determine the power P(F) in accordance with the equation ${{P(F)} = {{SAT}\left\lbrack {A + \left( {{SAT}\left\lbrack {{{Re}_{1}\left( \frac{N}{D} \right)} + {{Re}_{2}\left( \frac{N}{D} \right)} + \ldots + {{Re}_{D}\left( \frac{N}{D} \right)}} \right\rbrack} \right)^{2} + \left( {{SAT}\left\lbrack {{{Im}_{1}\left( \frac{N}{D} \right)} + {{Im}_{2}\left( \frac{N}{D} \right)} + \ldots + {{Im}_{D}\left( \frac{N}{D} \right)}} \right\rbrack} \right)^{2}} \right\rbrack}},$ where SAT[ ] is a saturation function and A is an additive correction.
 5. The DSP of claim 1, wherein the DSP is adapted to perform silence detection for the data frame (i) prior to performing tone detection and (ii) using the ALUs of the plurality of D ALUs in parallel, wherein the silence detection comprises filtering a given frequency range of the signal.
 6. The DSP of claim 5, wherein the filtering uses the filter equation below: z _(n) =A·(1+B ₀ +B ₁ + . . . +B _(D−3))+B ₀(x _(n) −x _(n−2))+B ₁(x _(n−1) −x _(n−3))+B ₂(x _(n−2) −x _(n−4))+ . . . +B _(D−3)(x _(n−D−3) −x _(n−D−5))+B _(D−2) ·z _(n−D+2) +B _(D−1) ·z _(n−D+1), where A is an additive correction, B_(i) is the ith multiplicative factor, x_(i) is the ith sample of the data frame, and z_(n) is the filter output.
 7. A digital signal processor (DSP) comprising a plurality of 4 arithmetic logic units (ALUs), wherein the DSP is adapted to: receive an N-sample data frame comprising digital samples corresponding to an audio signal; and perform tone detection for the data frame using the ALUs of the plurality of 4 ALUs in parallel, wherein the tone detection comprises: (i) determining a power P(F) of a frequency F for the data frame by performing the following operations for n=1, . . . , N/4, wherein the DSP reads a sequential 4-sample group from the N-sample data frame for each value of n: (a) generate V_(a)(n) where V_(a)(n)=M·x_(4n−4+a), for a=1, . . . , 4; (b) generate Re₁(n) where ${{{Re}_{1}(n)} = {{{Re}_{1}\left( {n - 1} \right)} + {{V_{1}(n)} \cdot {\cos\left( {\frac{2\pi\; F}{F_{s}}\left( {N - {4n} + 3} \right)} \right)}}}};$ (c) generate Im₁(n) where ${{{Im}_{1}(n)} = {{{Im}_{1}\left( {n - 1} \right)} + {{V_{1}(n)} \cdot {\sin\left( {\frac{2\pi\; F}{F_{s}}\left( {N - {4n} + 3} \right)} \right)}}}};$ (d) generate Re₂(n) where ${{{Re}_{2}(n)} = {{{Re}_{2}\left( {n - 1} \right)} + {{V_{2}(n)} \cdot {\cos\left( {\frac{2\pi\; F}{F_{s}}\left( {N - {4n} + 2} \right)} \right)}}}};$ (e) generate Im₂(n) where ${{{Im}_{2}(n)} = {{{Im}_{2}\;\left( {n - 1} \right)} + {{V_{2}(n)} \cdot {\sin\left( {\frac{2\pi\; F}{F_{s}}\left( {N - {4n} + 2} \right)} \right)}}}};$ (f) generate Re₁(n) where ${{{Re}_{1}(n)} = {{{Re}_{1}(n)} + {{V_{3}(n)} \cdot {\cos\left( {\frac{2\pi\; F}{F_{s}}\left( {N - {4n} + 1} \right)} \right)}}}};$ (g) generate Im₁(n) where ${{{Im}_{1}(n)} = {{{Im}_{1}(n)} + {{V_{3}(n)} \cdot {\sin\left( {\frac{2\pi\; F}{F_{s}}\left( {N - {4n} + 1} \right)} \right)}}}};$ (h) generate Re₂(n) where ${{{Re}_{2}(n)} = {{{Re}_{2}\;(n)} + {V_{4}\;{(n) \cdot {\cos\left( {\frac{2\pi\; F}{F_{s}}\left( {N - {4n}} \right)} \right)}}}}};$  and (i) generate Im₂(n) where ${{{Im}_{2}(n)} = {{{Im}_{2}(n)} + {{V_{4}(n)} \cdot {\sin\left( {\frac{2\pi\; F}{F_{s}}\left( {N - {4n}} \right)} \right)}}}},$  wherein V_(a)(n), Re₁ (n), Re₂(n), Im₁(n), and Im₂(n) are storage variables, F_(s) is the sampling frequency for the data frame, x_(i) is the ith sample of the data frame, a is a counting variable, and M is a normalization factor; and (ii) thresholding the determined power P(F) to determine whether a tone corresponding to the frequency F is present in the audio signal.
 8. The DSP of claim 7, wherein the DSP is adapted to determine the power P(F) in accordance with the equation ${{P(F)} = {{SAT}\left\lbrack {A + \left( {{SAT}\left\lbrack {{{Re}_{1}\left( \frac{N}{4} \right)} + {{Re}_{2}\left( \frac{N}{4} \right)}} \right\rbrack} \right)^{2} + \left( {{SAT}\left\lbrack {{{Im}_{1}\left( \frac{N}{4} \right)} + {{Im}_{2}\left( \frac{N}{4} \right)}} \right\rbrack} \right)^{2}} \right\rbrack}},$ wherein SAT[ ] is a saturation function and A is an additive correction.
 9. The DSP of claim 7, wherein the DSP is adapted to: (A) initialize Re₁(0) to ${A \cdot {\sum\limits_{m = 0}^{N - 1}\left\lbrack {{\cos\left( {\frac{2\pi\; F}{F_{s}}m} \right)} - {\sin\left( {\frac{2\pi\; F}{F_{s}}m} \right)}} \right\rbrack}};$ (B) initialize Im₁(0) to ${A \cdot {\sum\limits_{m = 0}^{N - 1}\left\lbrack {{\cos\left( {\frac{2\pi\; F}{F_{s}}m} \right)} + {\sin\left( {\frac{2\pi\; F}{F_{s}}m} \right)}} \right\rbrack}};$  and (C) initialize Re₂(0) and Im₂(0) to 0, wherein A is an additive correction and m is a counting variable.
 10. The DSP of claim 7, wherein the DSP is adapted to: perform operations (a) in one clock cycle for any one value of n by using all the ALUs of the plurality of 4 ALUs in parallel; perform operations (b)-(e) in one clock cycle for any one value of n by using all the ALUs of the plurality of 4 ALUs in parallel; and perform operations (f)-(i) in one clock cycle for any one value of n by using all the ALUs of the plurality of 4 ALUs in parallel.
 11. The DSP of claim 7, wherein the DSP is adapted to perform silence detection for the data frame (i) prior to performing tone detection and (ii) using all the ALUs of the plurality of 4 ALUs in parallel, wherein the silence detection comprises filtering a given frequency range of the signal.
 12. The DSP of claim 11, wherein the filtering uses the filter equation below: z _(n) =A·(1+B ₀ +B ₁ + . . . +B _(D−3))+B ₀(x _(n) −x _(n−2))+B ₁(x _(n−1) −x _(n−3))+B ₂(x _(n−2) −x _(n−4))+ . . . +B _(D−3)(x _(n−D−3) −x _(n−D−5))+B _(D−2) ·z _(n−D+2) +B _(D−1) ·z _(n−D+1), where A is an additive correction, B_(i) is the ith multiplicative factor, x_(i) is the ith sample of the data frame, and z_(n) is the filter output.
 13. A digital signal processor (DSP) comprising a plurality of D arithmetic logic units (ALUs), wherein the DSP is adapted to: receive an N-sample data frame comprising digital samples corresponding to an audio signal; and perform tone detection for the data frame using the ALUs of the plurality of D ALUs in parallel, wherein the tone detection comprises: (i) determining a power P(F) of a frequency F for the data frame by performing the following operations on the N-sample data frame: (a) initialize Re(0) and Im(0) to 0; (b) for n=1, . . . , [N/2D]: (1) generate Re₁ (n) where ${{{Re}_{1}(n)} = {{A \cdot {\sum\limits_{s = 0}^{D}\left\lbrack {{\cos\left( \;{s\;\alpha} \right)} - {\sin\left( {s\;\alpha} \right)}} \right\rbrack}} + {\sum\limits_{s = 1}^{D}\left\lbrack {{\cos\left( {s\;\alpha} \right)} \cdot M \cdot x_{{2D\; n} - D - s}} \right\rbrack} + {{\cos\left( {D\;\alpha} \right)} \cdot {{Re}\left( {n - 1} \right)}} - {{\sin\left( {D\;\alpha} \right)} \cdot {{Im}\left( {n - 1} \right)}} + {M \cdot x_{{2{Dn}} - D}}}};$ (2) generate Im₁(n) where ${{{Im}_{1}(n)} = {{A \cdot {\sum\limits_{s = 0}^{D}\left\lbrack {{\cos\left( {s\;\alpha} \right)} + {\sin\left( {s\;\alpha} \right)}} \right\rbrack}} + {\sum\limits_{s = 1}^{D}\left\lbrack {{\sin\left( {s\;\alpha} \right)} \cdot M \cdot x_{{2{Dn}} - D - s}} \right\rbrack} + {{\sin\left( {D\;\alpha} \right)} \cdot {{Re}\left( {n - 1} \right)}} + {{\cos\left( {D\;\alpha} \right)} \cdot {{Im}\left( {n - 1} \right)}}}};$ (3) generate Re(n) where Re(n)=SAT[Re₁(n)]; (4) generate Im(n) where Im(n)=SAT[Im₁(n)]; (5) generate Re₂(n) where ${{{Re}_{2}(n)} = {{A \cdot {\sum\limits_{s = 0}^{D}\left\lbrack {{\cos\left( {s\;\alpha} \right)} - {\sin\left( {s\;\alpha} \right)}} \right\rbrack}} + {\sum\limits_{s = 1}^{D}\left\lbrack {{\cos\left( {s\;\alpha}\; \right)} \cdot M \cdot x_{{2{Dn}} - s}} \right\rbrack} + {{\cos\left( {D\;\alpha} \right)} \cdot {{Re}(n)}} - {{\sin\left( {D\;\alpha} \right)} \cdot {{Im}(n)}} + {M \cdot x_{2{Dn}}}}};$  and (6) generate Im₂(n) where ${{{Im}_{2}(n)} = {{A \cdot {\sum\limits_{s = 0}^{D}\left\lbrack {{\cos\left( {s\;\alpha} \right)} + {\sin\left( {s\;\alpha} \right)}} \right\rbrack}} + {\sum\limits_{s = 1}^{D}\left\lbrack {{\sin\left( {s\;\alpha} \right)} \cdot M \cdot x_{{2{Dn}} - s}} \right\rbrack} + {{\sin\left( {D\;\alpha} \right)} \cdot {{Re}(n)}} + {{\cos\left( {D\;\alpha} \right)} \cdot {{Im}(n)}}}};$ (7) generate Re(n) where Re(n)=SAT[Re₂(n)]; (8) generate Im(n) where Im(n)=SAT[Im₂(n)]; and (c) generate P(F) where P(F)=Re(N/2D)²+Im(N/2D)², wherein Re(n), Re₁(n), Re₂(n), Im(n), Im₁(n), and Im₂(n) are storage variables, s is a counting variable, A is an additive correction, M is a normalization factor, SAT[ ] is a saturation function, and α is 2πF/F_(s), where F_(s) is a sampling frequency for the data frame; and (ii) thresholding the determined power P(F) to determine whether a tone corresponding to the frequency F is present in the audio signal.
 14. The DSP of claim 13, wherein the DSP is adapted to perform silence detection for the data frame (i) prior to performing tone detection and (ii) using the ALUs of the plurality of D ALUs in parallel, wherein the silence detection comprises filtering a given frequency range of the signal.
 15. The DSP of claim 14, wherein the filtering uses the filter equation below: z _(n) =A·(1+B ₀ +B ₁ + . . . +B _(D−3))+B ₀(x _(n) −x _(n−2))+B ₁(x _(n−1) −x _(n−3))+B ₂(x _(n−2) −x _(n−4))+ . . . +B _(D−3)(x _(n−D−3) −x _(n−D−5))+B _(D−2) ·z _(n−D+2) +B _(D−1) ·z _(n−D+1), where A is an additive correction, B_(i) is the ith multiplicative factor, x_(i) is the ith sample of the data frame, and z_(n) is the filter output.
 16. A digital signal processor (DSP) comprising a plurality of D arithmetic logic units (ALUs), wherein: the DSP is adapted to: receive an N-sample data frame comprising digital samples corresponding to an audio signal; and perform silence detection for the data frame using the ALUs of the plurality of D ALUs in parallel, wherein the silence detection comprises filtering a given frequency range of the signal; and the filtering uses the filter equation below: z _(n) =A·(1+B ₀ +B ₁ + . . . +B _(D−3))+B ₀(x _(n) −x _(n−2))+B ₁(x _(n−1) −x _(n−3))+B ₂(x _(n−2) −x _(n−4))+ . . . +B _(D−3)(x _(n−D−3) −x _(n−D−5))+B _(D−2) ·z _(n−D+2) +B _(D−1) ·z _(n−D+1), where A is an additive correction, B_(i) is the ith multiplicative factor, x_(i) is the ith sample of the data frame, and z_(n) is the filter output.
 17. The DSP of claim 16, wherein: (A) B₀=B₀; (B) B₁=A·B₀; and (C) for i=2 to D−3 B_(i)+A₂·B_(i−2), where A_(i) and B_(i) are multiplicative factors.
 18. The DSP of claim 17, wherein B₀ is 0.825, A₁ is −0.16, and A₂ is −0.6499.
 19. A digital signal processor (DSP) comprising a plurality of D arithmetic logic units (ALUs), wherein: the DSP is adapted to: receive an N-sample data frame comprising digital samples corresponding to an audio signal; and perform silence detection for the data frame using the ALUs of the plurality of D ALUs in parallel, wherein the silence detection comprises filtering a given frequency range of the signal; and the DSP comprises at least four ALUs and silence detection comprises performing the filtering operations below for n=2, 4, 6, . . . , N: (1) q_(n)=A; (2) q_(n−1)=A; (3) q_(n)=q_(n)−B₀·x_(n−2); (4) q_(n−1)=q_(n−1)−B₀·x_(n−3); (5) read x_(n−1) and x_(n); (6) q_(n)=q_(n)+B₀·x_(n); (7) q_(n−1)=q_(n−1)+B₀·x_(n−1); (8) z_(n)=q_(n); (9) z_(n−1)=q_(n−1); (10) z_(n)=z_(n)+A₁·z_(n−1); (11) z_(n)=z_(n)+A_(1·2)·z_(n-3); (12) z_(n−1)=z_(n−1)+A₂·z_(n−3); (13) z_(n)=z_(n)+A_(1·1+2)·z_(n−2); (14) z_(n−1)=z_(n−1)+A₁·z_(n−2); and (15) write z_(n−1) and z_(n), where z_(k) is an output of the silence detection, q_(k) is storage variable, A is an additive correction, k and n are counting variables, B₀, A₁, and A₂ are multiplicative factors, A_(1·2) represents A₁·A₂, and A_(1·1+2) represents A·A₁+A₂.
 20. The DSP of claim 19, wherein the DSP is adapted to perform: (A) operations (1)s, (2)s, (8)s−2, (9)s−2, (11)s−4, (12)s−4 in parallel and in one clock cycle; (B) operations (3)s, (4)s, (5)s, (13)s−4, (14)s−4 in parallel and in one clock cycle; and (C) operations (6)s−2, (7)s−2, (10)s−2, (15)s−4 in parallel and in one clock cycle, where the subscript indices s, s−2, and s−4 correspond to values of n for which the corresponding operation is performed.
 21. A digital signal processor (DSP) comprising a plurality of D arithmetic logic units (ALUs), wherein: the DSP is adapted to: receive an N-sample data frame comprising digital samples corresponding to an audio signal; and perform silence detection for the data frame using the ALUs of the plurality of D ALUs in parallel, wherein the silence detection comprises filtering a given frequency range of the signal; the filtering uses the filter equation below: z _(n) =A·(1+B ₀ +B ₁ + . . . +B _(D−3))+B ₀(x _(n) −x _(n−2))+B ₁(x _(n−1) −x _(n−3))+B ₂(x _(n−2) −x _(n−4))+ . . . +B _(D−3)(x _(n−D−3) −x _(n−D−5))+B _(D−2) ·z _(n−D+2) +B _(D−1) ·z _(n−D+1), where A is an additive correction, B_(i) is the ith multiplicative factor, x_(i) is the ith sample of the data frame, and z_(n) is the filter output; and the DSP performs tone detection for the data frame if and only if the DSP determined, in performing the silence detection for the data frame, that the data frame does not represent silence.
 22. The DSP of claim 21, wherein the DSP performs tone detection for the data frame (i) after performing the silence detection and (ii) using the ALUs of the plurality of D ALUs in parallel, wherein the tone detection comprises (i) determining a power P(F) of a frequency F for the data frame and (ii) thresholding the determined power P(F) to determine whether a tone corresponding to the frequency F is present in the audio signal. 